package org.bt.common.validator.aspect;


import org.bt.common.constant.CommonConstant;
import org.bt.common.validator.DateTimeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 日期格式
 * <p>
 * Created on 2020/1/10
 *
 * @author tongw
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {DateTimeValidator.class})
public @interface DateTime {
    String message() default CommonConstant.Valid.DATE_TIME;

    String name() default "日期";

    String format() default CommonConstant.DateTimeFormat.YMD;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
